<div ng-controller='CourseIndex' class='right-cont'>
    <div class='title'>
        <div class="title-line" ></div>
        <div class="title-word" >课程列表</div>
    </div>
    <div class='box-cont'>

        <div class='box-tab' >
            <ul class='nav nav-tabs' style="margin-bottom: 19px">
                <li class="first active  pull-left">
                    <a data-toggle='tab' ng-click="changeIndex('2')">全部</a>
                </li>
                <li class="second  pull-left">
                    <a data-toggle='tab' ng-click="changeIndex('1')">已上架</a>
                </li>
                <li class="third  pull-left">
                    <a data-toggle='tab' ng-click="changeIndex('0')">已下架</a>
                </li>
            </ul>
            <div class='tab-content'>
                <div class='tab-pane fade active in'>
                    <table class='table table-list wrap-checkbox'>
                        <tr>

                            <td>课程ID</td>
                            <td>名称</td>
                            <td>主讲人</td>
                            <td>章节数</td>
                            <td>价格</td>
                            <td>课程类型</td>
                            <td>课程资料</td>
                            <td>上/下架</td>
                            <td>操作</td>
                        </tr>
                        <tr ng-repeat='course in courses'>

                            <td>{{course.id}}</td>
                            <td><span style="color:#58a3e9 ">{{course.name}}</span></td>
                            <td>{{course.teacher}}</td>
                            <td><span style="color:#e74939 ">{{course.chapter}}节</span></td>
                            <td>{{course.price}}元</td>
                            <td>{{course.cate_title}}</td>
                            <td><button type="button" class="btn btn-success btn-xs btn-w-xs">查看</button></td>
                            <td>
                                <a ng-if='course.status == 1' style="color:#d25149;text-decoration: none;cursor: pointer" onclick="alert('888')" ng-click='change_status(course.id,0)'>下架</a>
                                <a ng-if='course.status == 0' style="color:#89d1d1;text-decoration: none;cursor: pointer" ng-click='change_status(course.id,1)'>上架</a>
                            </td>
                            <td>
                                <a ng-click='edit(user.id)' style="color: inherit;text-decoration: none;cursor: pointer">
                                    <i class="fa fa-pencil" aria-hidden="true"></i>编辑
                                </a>
                                <div class="button-line" ></div>
                                <a ng-click='change_status(course.id,-1)' style="color: inherit;text-decoration: none;cursor: pointer">
                                    <i class="fa fa-trash" aria-hidden="true"></i>删除
                                </a>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class='box-page' ng-bind-html='pages'></div>
        </div>
    </div>

</div>